package com.sumainfor.pc.market.controller.rentadviser;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.market.service.RdBankService;
import com.sumainfor.pc.market.service.RdTenantBlaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Date 2018年11月7日
 * @Describe 租客黑名单
 */
@RestController
@RequestMapping("/rentadviser/RdTenantBlaController")
public class RdTenantBlaController implements Serializable {

    @Autowired
    private RdTenantBlaService rdTenantBlaService;

    /**
     * 查询客户拉黑记录
     */
    @GetMapping("/getTcmktBankList")
    public JsonResult getTcmktBankList(@RequestParam Map<String, Object> params) {
        JsonResult result = new JsonResult();
        List<Map<String, Object>> list = rdTenantBlaService.getTcmktBankList(params);
        if (list != null) {
            result.put(list);
        } else {
            result.putFailed("服务器繁忙");
        }
        return result;
    }

    /**
     * 服务管家拉黑租客
     */
    @PostMapping("/addHoTenantBla")
    public JsonResult getTenSysUserInfoListForGmio(@RequestBody Map<String, Object> params) {
        JsonResult result = new JsonResult();
        return rdTenantBlaService.addHoTenantBla(params);
    }

    /**
     * @return com.sumainfor.common.util.JsonResult
     * @Description //TODO 运营助理或者经理审核黑名单
     * @Param [params]
     * @Date 2019/9/3 14:49  meng
     **/
    @PostMapping("/updateHoTenantBla")
    public JsonResult updateHoTenantBla(@RequestBody Map<String, Object> params) {

        return rdTenantBlaService.updateHoTenantBla(params);
    }

    /**
     * @return com.sumainfor.common.util.JsonResult
     * @Description //TODO 运营助理或者经理驳回黑名单
     * @Param [params]
     * @Date 2019/9/3 14:49  meng
     **/
    @PostMapping("/deleteHoTenantBla")
    public JsonResult deleteHoTenantBla(@RequestBody Map<String, Object> params) {

        return rdTenantBlaService.deleteHoTenantBla(params);
    }
}
